/*
 * @Descripttion: 商品管理
 * @Author: 何伟伦 weilun@ssc-hn.com
 * @Date: 2024-04-10
 * @LastEditors: 何伟伦 weilun@ssc-hn.com
 * @LastEditTime: 2024-04-10
 */
import request from '/@/api/request'

/** 获取商品列表 */
export const requestGetGoodsList = (data: GetGoodListTypes.IRequest) => {
  return request.post<IBaseResponse<GetGoodListTypes.IResponse[]>>('/business/tracecode/goods/list/V1', data)
}
/** 新增商品 */
export const requestAddGoods = (data: ControlGoodTypes.IRequest) => {
  return request.post<IBaseResponse<ControlGoodTypes.IResponse>>('/business/tracecode/goods/add/V1', data)
}
/** 更新修改商品 */
export const requestUpdateGoods = (data: ControlGoodTypes.IRequest) => {
  return request.post<IBaseResponse<ControlGoodTypes.IResponse>>('/business/tracecode/goods/update/V1', data)
}
/** 删除商品 */
export const requestDeleteGoods = (data: ControlGoodTypes.IDetailsRequest) => {
  return request.get<IBaseResponse<ControlGoodTypes.IResponse>>('/business/tracecode/goods/delete/V1', data)
}
/** 根据id获取商品详情 */
export const requestGetDetailGoods = (data: ControlGoodTypes.IDetailsRequest) => {
  return request.get<IBaseResponse<ControlGoodTypes.IResponse>>('/business/tracecode/goods/getById/V1', data)
}
